package com.letoken.platform.repo.repo.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 网络节点配置
 * </p>
 *
 * @author 作者
 * @since 2023-02-01
 */
@Getter
@Setter
@TableName("app_chain_node")
@ApiModel(value = "AppChainNode对象", description = "网络节点配置")
public class AppChainNode extends Model<AppChainNode> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("编号")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("网络编号")
    @TableField("chain_id")
    private Integer chainId;

    @ApiModelProperty("节点名称")
    @TableField("node_name")
    private String nodeName;

    @ApiModelProperty("节点网址")
    @TableField("node_url")
    private String nodeUrl;

    @ApiModelProperty("网络速度(毫秒)")
    @TableField("node_speed")
    private Integer nodeSpeed;

    @ApiModelProperty("网络状态(1正常 2异常）")
    @TableField("node_status")
    private Integer nodeStatus;

    @ApiModelProperty("排序")
    @TableField("sort")
    private Integer sort;

    @ApiModelProperty("启用状态(0禁用 1启用）")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("更新日期")
    @TableField("update_date")
    private LocalDateTime updateDate;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
